#include "roman13i.h"
#include <nds.h>

using namespace WoopsiUI;

static const u16 Roman13i_glyphdata[582] = {
/* '!' */	0x24A4,0x9210,0x0000,
/* '"' */	0xB680,0x0000,0x0000,
/* '#' */	0x2448,0x97F2,0x493F,0xA448,0x9000,0x0000,0x0000,
/* '$' */	0x0879,0x2A45,0x0606,0x0A95,0x49E1,0x0000,0x0000,
/* '%' */	0x70A4,0x4922,0x48E4,0x0271,0x2449,0x2250,0xE000,0x0000,0x0000,0x0000,
/* '&' */	0x1C24,0x2428,0x3050,0x8986,0xCE7B,0x0000,0x0000,0x0000,
/* ''' */	0xE000,
/* '(' */	0x1244,0x4888,0x8888,0x4000,
/* ')' */	0x4492,0x4949,0x4000,
/* '*' */	0x27C8,0xA000,0x0000,0x0000,0x0000,
/* '+' */	0x0020,0x408F,0xE204,0x0800,0x0000,0x0000,0x0000,
/* ',' */	0x0000,0x1600,
/* '-' */	0x0000,0x3800,0x0000,
/* '.' */	0x0040,
/* '/' */	0x0884,0x4221,0x1080,0x0000,0x0000,
/* '0' */	0x3914,0x6186,0x1862,0x89C0,0x0000,0x0000,
/* '1' */	0x089D,0x2108,0x4421,0x0000,0x0000,
/* '2' */	0x3914,0x4108,0x4210,0x83E0,0x0000,0x0000,
/* '3' */	0x3914,0x4118,0x1061,0x89C0,0x0000,0x0000,
/* '4' */	0x0431,0x4A29,0x28BF,0x1040,0x0000,0x0000,
/* '5' */	0x3D04,0x2EC4,0x1061,0x89C0,0x0000,0x0000,
/* '6' */	0x3914,0x2EC6,0x1861,0x89C0,0x0000,0x0000,
/* '7' */	0xF844,0x4221,0x0884,0x0000,0x0000,
/* '8' */	0x3914,0x5139,0x1861,0x89C0,0x0000,0x0000,
/* '9' */	0x3918,0x6186,0x3742,0x89C0,0x0000,0x0000,
/* ':' */	0x0100,0x2000,
/* ';' */	0x0010,0x0009,0x4000,
/* '<' */	0x0000,0x4662,0x0606,0x0400,0x0000,0x0000,
/* '=' */	0x0000,0x3F00,0x0FC0,0x0000,0x0000,0x0000,
/* '>' */	0x0008,0x1818,0x1198,0x8000,0x0000,0x0000,
/* '?' */	0x7462,0x1111,0x0802,0x0000,0x0000,
/* '@' */	0x0F83,0x0460,0x2469,0x8999,0x1991,0x1912,0x932C,0xDC40,0x1306,0x1F80,0x0000,0x0000,
/* 'A' */	0x040A,0x0A12,0x1222,0x3F41,0x4181,0x0000,0x0000,0x0000,
/* 'B' */	0x3E21,0x2141,0x7E41,0x4141,0x82FC,0x0000,0x0000,0x0000,
/* 'C' */	0x1E61,0x4180,0x8080,0x8182,0x4638,0x0000,0x0000,0x0000,
/* 'D' */	0x3C22,0x4141,0x4141,0x4182,0x86F8,0x0000,0x0000,0x0000,
/* 'E' */	0x3F90,0x1008,0x07E2,0x0101,0x0080,0x7F00,0x0000,0x0000,0x0000,
/* 'F' */	0x3F20,0x4040,0x7E40,0x4080,0x8080,0x0000,0x0000,0x0000,
/* 'G' */	0x1E10,0x9030,0x0804,0x7E03,0x0241,0x1F00,0x0000,0x0000,0x0000,
/* 'H' */	0x2121,0x4142,0x7E42,0x4282,0x8484,0x0000,0x0000,0x0000,
/* 'I' */	0x2524,0x9490,0x0000,
/* 'J' */	0x0410,0x4208,0x20A2,0x9180,0x0000,0x0000,
/* 'K' */	0x2122,0x4448,0x5068,0x4884,0x8282,0x0000,0x0000,0x0000,
/* 'L' */	0x2084,0x1041,0x0420,0x83F0,0x0000,0x0000,
/* 'M' */	0x30CC,0x6519,0x4A52,0x9525,0x4A54,0x9922,0x4000,0x0000,0x0000,0x0000,
/* 'N' */	0x2131,0x5152,0x524A,0x4A8A,0x8A84,0x0000,0x0000,0x0000,
/* 'O' */	0x1E10,0x9030,0x180C,0x0603,0x0242,0x1E00,0x0000,0x0000,0x0000,
/* 'P' */	0x3E21,0x4141,0x427C,0x4080,0x8080,0x0000,0x0000,0x0000,
/* 'Q' */	0x1E10,0x9030,0x180C,0x0603,0x1247,0x1F00,0x4000,0x0000,0x0000,
/* 'R' */	0x3E21,0x4141,0x417E,0x4484,0x8282,0x0000,0x0000,0x0000,
/* 'S' */	0x3E41,0x4140,0x300C,0x0282,0x827C,0x0000,0x0000,0x0000,
/* 'T' */	0xFE20,0x4082,0x0408,0x1040,0x8000,0x0000,0x0000,
/* 'U' */	0x4141,0x4142,0x8282,0x8282,0x8478,0x0000,0x0000,0x0000,
/* 'V' */	0x8306,0x1224,0x8914,0x2850,0x4000,0x0000,0x0000,
/* 'W' */	0x820C,0x3061,0x8514,0x2492,0x28A1,0x450C,0x3061,0x8208,0x0000,0x0000,0x0000,0x0000,0x0000,
/* 'X' */	0x2048,0x2110,0x480C,0x0201,0x4090,0x4220,0x8000,0x0000,0x0000,0x0000,
/* 'Y' */	0x8142,0x4444,0x2830,0x1020,0x2020,0x0000,0x0000,0x0000,
/* 'Z' */	0x3F01,0x0204,0x0810,0x2040,0x80FE,0x0000,0x0000,0x0000,
/* '[' */	0x3224,0x4444,0x4488,0xC000,
/* '\' */	0x9224,0x9224,0x0000,
/* ']' */	0x3111,0x2222,0x2244,0xC000,
/* '^' */	0x0114,0xA544,0x0000,0x0000,0x0000,
/* '_' */	0x0000,0x0000,0x0000,0x0000,0x00FC,0x0000,
/* '`' */	0x9000,0x0000,
/* 'a' */	0x0000,0x0E44,0x17E2,0x89E0,0x0000,0x0000,
/* 'b' */	0x2041,0x02E6,0x2850,0xC1C5,0x7000,0x0000,0x0000,
/* 'c' */	0x0000,0x0E46,0x0820,0x89C0,0x0000,0x0000,
/* 'd' */	0x0204,0x11A4,0xD0A1,0x4498,0xD000,0x0000,0x0000,
/* 'e' */	0x0000,0x0E46,0x1FE0,0x89C0,0x0000,0x0000,
/* 'f' */	0x344E,0x4448,0x8800,0x0000,
/* 'g' */	0x0000,0x00D2,0x6850,0xA244,0x7814,0x4780,0x0000,
/* 'h' */	0x2082,0x1665,0x1462,0x8A20,0x0000,0x0000,
/* 'i' */	0x2024,0x9490,0x0000,
/* 'j' */	0x1002,0x2224,0x4444,0x8000,
/* 'k' */	0x2084,0x1149,0x46A2,0x8610,0x0000,0x0000,
/* 'l' */	0x24A4,0x9290,0x0000,
/* 'm' */	0x0000,0x0001,0x6666,0x5114,0x4622,0x88A2,0x2000,0x0000,0x0000,0x0000,
/* 'n' */	0x0000,0x1665,0x1461,0x8A20,0x0000,0x0000,
/* 'o' */	0x0000,0x0E46,0x1861,0x89C0,0x0000,0x0000,
/* 'p' */	0x0000,0x0163,0x2450,0xA164,0xB204,0x0800,0x0000,
/* 'q' */	0x0000,0x01D4,0x70A1,0x428C,0xE820,0x4080,0x0000,
/* 'r' */	0x0005,0x6448,0x8800,0x0000,
/* 's' */	0x0000,0x0E45,0x81E1,0x85E0,0x0000,0x0000,
/* 't' */	0x0974,0xA498,0x0000,
/* 'u' */	0x0000,0x1145,0x1462,0x99A0,0x0000,0x0000,
/* 'v' */	0x0000,0x218A,0x2514,0x6100,0x0000,0x0000,
/* 'w' */	0x0000,0x0089,0x9999,0xAA66,0x6644,0x0000,0x0000,0x0000,
/* 'x' */	0x0000,0x0212,0x4504,0x1449,0x0800,0x0000,0x0000,
/* 'y' */	0x0000,0x0214,0x4892,0x2450,0x6081,0x0C00,0x0000,
/* 'z' */	0x0000,0x1F08,0x4108,0x43E0,0x0000,0x0000,
/* '{' */	0x0C41,0x0420,0x8C10,0x4104,0x1060,0x0000,
/* '|' */	0xFFF8,
/* '}' */	0x6222,0x2216,0x4444,0x8000,
/* '~' */	0x0000,0x00E6,0x7000,0x0000,0x0000,0x0000,
/* 0x7F */	0x0FC4,0x2108,0x4221,0x0842,0x1108,0x4210,0x8FC0,0x0000,0x0000,0x0000,
};

static const u16 Roman13i_offset[95] = {
    0,    3,    6,   13,   20,   30,   38,   39,   43,   46,   51,   58,   60,   63,   64,   69,
   75,   80,   86,   92,   98,  104,  110,  115,  121,  127,  129,  132,  138,  144,  150,  155,
  167,  175,  183,  191,  199,  208,  216,  225,  233,  236,  242,  250,  256,  266,  274,  283,
  291,  300,  308,  316,  323,  331,  338,  351,  361,  369,  377,  381,  384,  388,  393,  399,
  401,  407,  414,  420,  427,  433,  437,  444,  450,  453,  457,  463,  466,  476,  482,  488,
  495,  502,  506,  512,  515,  521,  527,  535,  542,  549,  555,  561,  562,  566,  572
};

static const u8 Roman13i_width[95] = {
 3, 3, 7, 7,10, 8, 1, 4, 3, 5, 7, 2, 3, 1, 5, 6,
 5, 6, 6, 6, 6, 6, 5, 6, 6, 2, 3, 6, 6, 6, 5,12,
 8, 8, 8, 8, 9, 8, 9, 8, 3, 6, 8, 6,10, 8, 9, 8,
 9, 8, 8, 7, 8, 7,13,10, 8, 8, 4, 3, 4, 5, 6, 2,
 6, 7, 6, 7, 6, 4, 7, 6, 3, 4, 6, 3,10, 6, 6, 7,
 7, 4, 6, 3, 6, 6, 8, 7, 7, 6, 6, 1, 4, 6,10
};

Roman13i::Roman13i(u8 fixedWidth) : PackedFont1 (
	33,
	127,
	Roman13i_glyphdata,
	Roman13i_offset,
	Roman13i_width,
	16,
	4,
	9,
	13
) {
	if (fixedWidth) setFontWidth(fixedWidth);
};
